package com.edais.service.imp;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.edais.dao.MediaDao;
import com.edais.domain.MediaDomain;
import com.edais.service.MediaService;
import com.edais.util.CommonUtil;
import com.edais.util.Consts;
@Service

public class MediaServiceImp implements MediaService {
	@Autowired
	private MediaDao mediaDao;
	@Override
	public String getMediaNo(Map paramMap) {
		Map<String, Object> rtnMap = new HashMap<String, Object>();
		List<MediaDomain> list = mediaDao.getMediaNo(paramMap);
		String tolalNum = getMediaCount(paramMap);
		rtnMap.put("list", list);
		rtnMap.put("totalNum", tolalNum);
		return CommonUtil.setResultInfo(rtnMap, Consts.SUCCESS_CODE, Consts.SUCCESS_DESCRIBE);
	}
	@Override
	public MediaDomain getMediaContent(String noticeId) {
		// TODO Auto-generated method stub
		return mediaDao.getMediaContent(noticeId);
	}
	@Override
	public String getMediaCount(Map paramMap) {
		// TODO Auto-generated method stub
		return mediaDao.getMediaCount(paramMap);
	}

}
